using System.Data.Entity.ModelConfiguration;

namespace ObjectMapper.Benchmark.DataModel
{
    internal class CountryRegionCurrencyConfiguration : EntityTypeConfiguration<CountryRegionCurrency>
    {
        public CountryRegionCurrencyConfiguration()
        {
            ToTable("Sales.CountryRegionCurrency");
            HasKey(x => new {x.CountryRegionCode, x.CurrencyCode});

            Property(x => x.CountryRegionCode).HasColumnName("CountryRegionCode").IsRequired().HasMaxLength(3);
            Property(x => x.CurrencyCode).HasColumnName("CurrencyCode").IsRequired().HasMaxLength(3);
            Property(x => x.ModifiedDate).HasColumnName("ModifiedDate").IsRequired();
        }
    }
}